home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0200-RE>C++ VMT implemen-Oct89 < prev    next >
Encoding:
Text File  |  1989-10-30  |  937 b   |  34 lines  |  [TEXT/GEOL]

  1. Item    0812790                         27-Oct-89        21:56
  2.  
  3. From:   SHEBANOW1                       Shebanow, Andrew
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    RE>C++ VMT implementation
  8.  
  9. Attn: MacApp.TECH$
  10. SentBy: Andrew Shebanow
  11.          Reply to:   RE>C++ VMT implementation?
  12. Apple has extended C++ to support Object Pascal style "VMT"s. There is a
  13. predefined base class called PascalObject. If a class descends from
  14. PascalObject, it uses the Object Pascal dispatching mechanism, and its memory
  15. is allocated by NewHandle instead of malloc.
  16.  
  17. A typical (mimimal) Object Pascal compatible class definition looks something
  18. like
  19. this:
  20.  
  21. class TMyView : public TView {
  22. public:
  23.    virtual pascal Draw(Rect* area);
  24. }
  25.  
  26. Inter-language compatibility is good enough that you can define a class in
  27. Pascal, subclass it in C++, and then subclass the C++ class in Pascal again.
  28.  
  29. Andrew Shebanow
  30. MacDTS
  31. Apple Computer
  32.  
  33.  
  34.